package com.qf.day2;

import java.util.Scanner;

public class SwitchDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入评价: ");
        String str = scanner.next();
        str= str.toUpperCase();
        switch(str){
            case "A":
                System.out.println("好评");
                break;
            case "B":
                System.out.println("一般");
                break;
            case "C":
                System.out.println("良好");
                break;
            case "D":
                System.out.println("差评");
                break;
            default:
                System.out.println("输入非法");
            //default 后面不需要break
        }
    }
}
